{*******************************************************************************
* The contents of this file are used with permission, subject to the Mozilla   *
* Public License Version 1.1 (the "License"); you may not use this file except *
* in compliance with the License. You may obtain a copy of the License at      *
* http://www.mozilla.org/MPL/                                                  *
*                                                                              *
* Software distributed under the License is distributed on an "AS IS" basis,   *
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for *
* the specific language governing rights and limitations under the License.    *
*                                                                              *
* The Original Code is distributed as part of the "mediate" product and is     *
* Copyright (C) @home media limited. All Rights Reserved.                      *
*                                                                              *
* Email: support@athomemedia.co.uk                                             *
* Web:   http://www.athomemedia.co.uk                                          *
*******************************************************************************}

unit MetaConsts;

interface

const
  // Markers for meta-data value names
  META_MARKER = '^';
  META_BEGIN = '{';
  META_END = '}';
  META_DAY_SUFFIX = 'x';
  META_BEGIN_LEN = 2;
  META_SEP = '.';
  META_INDEX = '#';
  META_COUNT = 'count';
  META_TEXT_BEG = '[';
  META_TEXT_END = ']';
  META_EXP_BEG = '(';
  META_EXP_END = ')';

  // Predefined meta data values
  META_TRUE = '1';
  META_FALSE = '0';
  META_BOOL_YES = 'yes';
  META_BOOL_NO = 'no';
  META_SORT_NAME = 'name';
  META_SORT_DATE = 'date';

  // Prefix for automatically persisted metadata
  META_PERSIST = 'persist';

  // Application meta data names
  META_APPLIST = 'application';
  META_APPNAME = META_APPLIST + META_SEP + 'name';
  META_APPEDITION = META_APPLIST + META_SEP + 'edition';
  META_APPTIME = META_APPLIST + META_SEP + 'time';
  META_APPDATE = META_APPLIST + META_SEP + 'date';
  META_APPURL = META_APPLIST + META_SEP + 'url';
  META_APPVER = META_APPLIST + META_SEP + 'version';
  META_APPHINT = META_APPLIST + META_SEP + 'hint';
  META_APPCONTROL = META_APPLIST + META_SEP + 'control';
  META_APPOWNER = META_APPLIST + META_SEP + 'owner';

  // System meta data names
  META_SYSTEM = 'system';
  META_BOOLEANS = META_SYSTEM + META_SEP + 'booleans';
  META_BOOLEANS_YES = META_BOOLEANS + META_SEP + META_BOOL_YES;
  META_BOOLEANS_NO = META_BOOLEANS + META_SEP + META_BOOL_NO;
  META_BOOLEANS_TRUE = META_BOOLEANS + META_SEP + META_TRUE;
  META_BOOLEANS_FALSE = META_BOOLEANS + META_SEP + META_FALSE;
  META_BOOLEAN_TEST = META_SYSTEM + META_SEP + 'testvalue';
  META_ERROR = META_SYSTEM + META_SEP + 'error';
  META_ERR_TEXT = META_ERROR + META_SEP + 'text';
  META_ERR_DESC = META_ERROR + META_SEP + 'description';

  // Media related meta data names
  META_MEDIA_NAME = META_SEP + 'name';
  META_MEDIA_URL = META_SEP + 'url';
  META_MEDIA_ROOT = META_SEP + 'root';
  META_MEDIA_FOLDER = META_SEP + 'folder';
  META_MEDIA_FILENAME = META_SEP + 'filename';
  META_MEDIA_SIZE = META_SEP + 'size';
  META_MEDIA_DATE = META_SEP + 'date';
  META_MEDIA_TIME = META_SEP + 'time';
  META_MEDIA_TYPE = META_SEP + 'type';
  META_MEDIA_AUTHOR = META_SEP + 'author';
  META_MEDIA_GROUP = META_SEP + 'group';
  META_MEDIA_CATEGORY = META_SEP + 'category';
  META_MEDIA_ICON = META_SEP + 'icon';
  META_MEDIA_DURATION = META_SEP + 'duration';
  META_MEDIA_DUR_SEC = META_SEP + 'durationseconds';
  META_MEDIA_BITRATE = META_SEP + 'bitrate';
  META_MEDIA_SEQUENCE = META_SEP + 'sequence';
  META_MEDIA_YEAR = META_SEP + 'year';

  META_MEDIA = 'media';
  META_MEDIA_SEL = META_MEDIA + META_SEP + 'selection';
  META_MEDIA_CURRENT = META_MEDIA + META_SEP + 'current';
  META_MEDIA_PRIMARY = META_MEDIA + META_SEP + 'primary';
  META_MEDIA_SECONDARY = META_MEDIA + META_SEP + 'secondary';
  META_MEDIA_CUR_PLAYING = META_MEDIA_CURRENT + META_SEP + 'playing';
  META_MEDIA_CUR_PAUSED = META_MEDIA_CURRENT + META_SEP + 'paused';
  META_MEDIA_CUR_STOPPED = META_MEDIA_CURRENT + META_SEP + 'stopped';
  META_MEDIA_CUR_DURATION = META_MEDIA_CURRENT + META_MEDIA_DURATION;
  META_MEDIA_CUR_POSITION = META_MEDIA_CURRENT + META_SEP + 'position';
  META_MEDIA_CUR_REMAINING = META_MEDIA_CURRENT + META_SEP + 'remaining';
  META_MEDIA_CUR_DUR_SEC = META_MEDIA_CURRENT + META_MEDIA_DUR_SEC;
  META_MEDIA_CUR_POS_SEC = META_MEDIA_CURRENT + META_SEP + 'positionseconds';
  META_MEDIA_CUR_REM_SEC = META_MEDIA_CURRENT + META_SEP + 'remainingseconds';
  META_MEDIA_CUR_VOLUME = META_MEDIA_CURRENT + META_SEP + 'volume';
  META_MEDIA_MIN_VOLUME = META_MEDIA_CURRENT + META_SEP + 'volumemin';
  META_MEDIA_CUR_DVDMENUACTIVE = META_MEDIA_CURRENT + META_SEP + 'dvdmenuactive';

  // Radio (RDS) related meta data names
  META_RADIO = 'radio';
  META_RADIO_STEREO = META_RADIO + META_SEP + 'stereo';
  META_RADIO_SIGNAL = META_RADIO + META_SEP + 'signal';
  META_RADIO_SIGNAL_MAX = META_RADIO_SIGNAL + META_SEP + 'maximum';
  META_RADIO_PROGRAM = META_RADIO + META_SEP + 'program';
  META_RADIO_STATION = META_RADIO + META_SEP + 'station';
  META_RADIO_REGION = META_RADIO + META_SEP + 'region';
  META_RADIO_COUNTRY = META_RADIO + META_SEP + 'country';
  META_RADIO_GENRE = META_RADIO + META_SEP + 'genre';
  META_RADIO_FREQUENCY = META_RADIO + META_SEP + 'frequency';
  META_RADIO_FREQ_VAL = META_RADIO_FREQUENCY + META_SEP + 'value';
  META_RADIO_FREQ_MAX = META_RADIO_FREQUENCY + META_SEP + 'maximum';

  // Playlist related meta data names
  META_PLAYL = 'playlist';
  META_PLAYL_MODE = META_PLAYL + META_SEP + 'mode';
  META_PLAYL_INSERT = 'insert';
  META_PLAYL_APPEND = 'append';
  META_PLAYL_REPLACE = 'replace';
  META_PLAYL_CURRENT = META_PLAYL + META_SEP + 'current';
  META_PLAYL_PRIMARY = META_PLAYL + META_SEP + 'primary';
  META_PLAYL_SECONDARY = META_PLAYL + META_SEP + 'secondary';
  META_PLAYL_INDEX = META_SEP + 'itemindex';
  META_PLAYL_COUNT = META_SEP + 'itemcount';

  // Predefined suffixes for UI grids - to be appended to MetaIndex value
  META_GRID_TEXT = META_SEP + 'text';
  META_GRID_PREFIX = META_SEP + 'prefix';
  META_GRID_DESCR = META_SEP + 'description';
  META_GRID_DATA = META_SEP + 'data';
  META_GRID_IMAGE = META_SEP + 'image';
  META_GRID_INDEX = META_SEP + 'itemindex';
  META_GRID_ITEMS = META_SEP + 'itemcount';
  META_GRID_PAGE = META_SEP + 'pageindex';
  META_GRID_PAGES = META_SEP + 'pagecount';
  META_GRID_SORTASC = META_SEP + 'sortascending';
  META_GRID_SORTTYPE = META_SEP + 'sorttype';
  META_GRID_SHUFFLE = META_SEP + 'shuffle';

  // Custom meta suffix for defining item properties and events within UI grids
  META_GRID_ITEM_DESC = 'description';
  META_GRID_ITEM_DATA = 'data';
  META_GRID_IMAGE_URL = 'imageurl';
  META_GRID_IMAGE_INDEX = 'imageindex';
  META_GRID_SELECT = 'onselect';
  META_GRID_SELECT_FUNCTION = META_GRID_SELECT + META_SEP + 'function';
  META_GRID_SELECT_TARGET = META_GRID_SELECT + META_SEP + 'target';
  META_GRID_SELECT_PARAM = META_GRID_SELECT + META_SEP + 'parameter';
  META_GRID_FOCUS = 'onfocus';
  META_GRID_FOCUS_FUNCTION = META_GRID_FOCUS + META_SEP + 'function';
  META_GRID_FOCUS_TARGET = META_GRID_FOCUS + META_SEP + 'target';
  META_GRID_FOCUS_PARAM = META_GRID_FOCUS + META_SEP + 'parameter';
  META_GRID_UNFOCUS = 'onunfocus';
  META_GRID_UNFOCUS_FUNCTION = META_GRID_UNFOCUS + META_SEP + 'function';
  META_GRID_UNFOCUS_TARGET = META_GRID_UNFOCUS + META_SEP + 'target';
  META_GRID_UNFOCUS_PARAM = META_GRID_UNFOCUS + META_SEP + 'parameter';

  // Settings meta data names
  META_SETTINGS = 'settings';
  META_THEME_SETTINGS = META_SETTINGS + META_SEP + 'theme';

  // Display settings
  META_DISPLAY = META_SETTINGS + META_SEP + 'display';
  META_SCREENSAVER = META_DISPLAY + META_SEP + 'screensaverdelay';
  META_SCREENSAVERS = META_DISPLAY + META_SEP + 'screensaverdelays';
  META_SCREENSIZE = META_DISPLAY + META_SEP + 'screensize';
  META_SCREENSIZES = META_DISPLAY + META_SEP + 'screensizes';
  META_FULLSCREEN = META_DISPLAY + META_SEP + 'fullscreen';
  META_VIDEOTHROTTLE = META_DISPLAY + META_SEP + 'throttle';
  META_VIDEOTHROTTLES = META_DISPLAY + META_SEP + 'throttles';

  // Screen position settings
  META_POSITION = META_SETTINGS + META_SEP + 'position';
  META_POS_XOFFSET = META_POSITION + META_SEP + 'xoffset';
  META_POS_XOFFSETS = META_POSITION + META_SEP + 'xoffsets';
  META_POS_YOFFSET = META_POSITION + META_SEP + 'yoffset';
  META_POS_YOFFSETS = META_POSITION + META_SEP + 'yoffsets';
  META_POS_XSCALE = META_POSITION + META_SEP + 'xscale';
  META_POS_XSCALES = META_POSITION + META_SEP + 'xscales';
  META_POS_YSCALE = META_POSITION + META_SEP + 'yscale';
  META_POS_YSCALES = META_POSITION + META_SEP + 'yscales';

  // Audio settings
  META_AUDIO = META_SETTINGS + META_SEP + 'audio';
  META_AUD_SOUNDEFFECT = META_AUDIO + META_SEP + 'soundeffect';
  META_EFFECT_VOLUME_MAX = META_AUD_SOUNDEFFECT + META_SEP + 'volumes';
  META_EFFECT_VOLUME = META_AUD_SOUNDEFFECT + META_SEP + 'volume';

  // General settings
  META_GENERAL = META_SETTINGS + META_SEP + 'general';
  META_GEN_THEME = META_GENERAL + META_SEP + 'theme';
  META_GEN_THEMES = META_GENERAL + META_SEP + 'themes';
  META_GEN_LANGUAGE = META_GENERAL + META_SEP + 'language';
  META_GEN_LANGUAGES = META_GENERAL + META_SEP + 'languages';

  // Slideshow settings
  META_SLIDESHOW = META_SETTINGS + META_SEP + 'slideshow';
  META_SLIDE_DURATION = META_SLIDESHOW + META_SEP + 'interval';
  META_SLIDE_DURATIONS = META_SLIDESHOW + META_SEP + 'intervals';
  META_SLIDE_PANZOOM = META_SLIDESHOW + META_SEP + 'panzoom';
  META_SLIDE_FADING = META_SLIDESHOW + META_SEP + 'fading';
  META_SLIDE_FULLIMAGE = META_SLIDESHOW + META_SEP + 'fullimage';

  // Visualisation settings
  META_VISUALISATION = META_SETTINGS + META_SEP + 'visualisation';
  META_VIS_QUALITY = META_VISUALISATION + META_SEP + 'quality';
  META_VIS_QUALITIES = META_VISUALISATION + META_SEP + 'qualities';

  // Equaliser settings
  META_EQUALISER = META_SETTINGS + META_SEP + 'equaliser';
  META_EQU_MAX_VALUE = META_EQUALISER + META_SEP + 'values';
  META_EQU_VAL_SUFFIX = 'value';
  META_BASS = META_EQUALISER + META_SEP + 'bass';
  META_BASS_ENABLED = META_BASS + META_SEP + 'enabled';
  META_BASS_VALUE = META_BASS + META_SEP + 'value';
  META_BASS_MAX_VALUE = META_BASS + META_SEP + 'values';
  META_BASS_FREQ = META_BASS + META_SEP + 'frequency';
  META_BASS_FREQ_VALUE = META_BASS_FREQ + META_SEP + 'value';
  META_BASS_MAX_FREQ = META_BASS_FREQ + META_SEP + 'values';
  META_TREBLE = META_EQUALISER + META_SEP + 'treble';
  META_TREBLE_ENABLED = META_TREBLE + META_SEP + 'enabled';
  META_TREBLE_VALUE = META_TREBLE + META_SEP + 'value';
  META_TREBLE_MAX_VALUE = META_TREBLE + META_SEP + 'values';
  META_TREBLE_FREQ = META_TREBLE + META_SEP + 'frequency';
  META_TREBLE_FREQ_VALUE = META_TREBLE_FREQ + META_SEP + 'value';
  META_TREBLE_MAX_FREQ = META_TREBLE_FREQ + META_SEP + 'values';
  META_SOUND3D = META_EQUALISER + META_SEP + '3dsound';
  META_SOUND3D_ENABLED = META_SOUND3D + META_SEP + 'enabled';
  META_SOUND3D_VALUE = META_SOUND3D + META_SEP + 'value';
  META_SOUND3D_MAX_VALUE = META_SOUND3D + META_SEP + 'values';

  // Music settings
  META_MUSIC = META_SETTINGS + META_SEP + 'music';
  META_MUSIC_COMPILATION = META_MUSIC + META_SEP + 'compilation';

  // Debug settings
  META_DEBUG = 'debug';
  META_DEBUG_PERSPECTIVE = META_DEBUG + META_SEP + 'perspective';
  META_DEBUG_BORDERS = META_DEBUG + META_SEP + 'borders';

{$IFDEF DESIGNER}
  // Designer sample metadata for previewing controls
  META_DESIGNER = 'designer';
  META_PREVIEW = META_DESIGNER + META_SEP + 'preview';
  META_PREVIEW_BAR = META_PREVIEW + META_SEP + 'bar';
  META_PREVIEW_BAR_VALUE = META_PREVIEW_BAR + META_SEP + 'value';
  META_PREVIEW_BAR_MAX = META_PREVIEW_BAR + META_SEP + 'max';
  META_PREVIEW_GAUGE = META_PREVIEW + META_SEP + 'gauge';
  META_PREVIEW_GAUGE_VALUE = META_PREVIEW_GAUGE + META_SEP + 'value';
  META_PREVIEW_GAUGE_MAX = META_PREVIEW_GAUGE + META_SEP + 'max';
  META_PREVIEW_DIAL = META_PREVIEW + META_SEP + 'dial';
  META_PREVIEW_DIAL_VALUE = META_PREVIEW_DIAL + META_SEP + 'value';
  META_PREVIEW_DIAL_MAX = META_PREVIEW_DIAL + META_SEP + 'max';
  META_PREVIEW_GRID = META_PREVIEW + META_SEP + 'grid';
  META_PREVIEW_GRID_VALUE = META_PREVIEW_GRID + META_SEP + 'items';
  META_PREVIEW_GRID_INDEX = 'name';
  META_PREVIEW_GRID_ITEM = META_PREVIEW_GRID_VALUE + META_SEP + META_INDEX +
                           '%d' + META_SEP + META_PREVIEW_GRID_INDEX;
{$ENDIF}

implementation

end.
